<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../include/laypublic.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>投建基本信息详情</title>
</head>
<style>
.fieldset {
	margin-top: 5px;
	margin-bottom: 0px
}

.layui-legend {
	background-color: #5fb878;
	font-size: 15px !important;
	width: 140px;
}

.layui-form-item {
	margin-bottom: 5px;
	clear: both;
	*zoom: 1;
}

.layui-form-label {
	width: 180px;
}

.scroll-wraper {	
	width: 85.65%;
	margin-left: 1.65%;
	background-color: red;
}

.scroll-wraper .scroll-layui-table {
	width: 100%;
	margin: 0 auto;
	background-color: #e01010;
	overflow-x: auto;
	border-right: 1px solid #e6e6e6;
	box-shadow: 0 0 10px rgba(0, 0, 0, .12);
	display:flex;
	flex-direction:row;
}

.scroll-wraper .scroll-layui-table .scroll-layui-table-wraper-left {
    width: 12.75%;
    overflow-x: hidden;
    border-right: 1px solid #e6e6e6;
    box-shadow: 0 0 10px rgba(0, 0, 0, .12);
    background-color: blue;
}

.scroll-wraper .scroll-layui-table .scroll-layui-table-wraper-left .layui-table {
	width: 400px;
}

.scroll-wraper .scroll-layui-table .scroll-layui-table-wraper-right {
    width: 87.25%;
    background-color: yellow;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
}

.scroll-wraper .scroll-layui-table .scroll-layui-table-wraper-right .scroll-layui-table-content {
    width: 3200px;
    display:block;
    background-color: #bbbbbb;
 	position:absolute;
	left:0px;
	top:0px;
}

.scroll-layui-table .layui-table {
	margin: 0px;
}
</style>
<body>
	<div class="layui-fluid">
		<div class="layui-card">
			<div class="layui-tab-item layui-show">
				<div class="layui-card">
					<div class="layui-card-body">
						<div class="layui-tab layui-tab-brief"
							lay-filter="component-tabs-brief">
							<ul class="layui-tab-title">
								<li class="layui-this"><B>表单信息</B></li>
								<li><B>审批信息</B></li>
							</ul>
							<div class="layui-tab-content">
								<div class="layui-tab-item layui-show">
									<!-- start 业务表单数据显示  put yourself data here -->
									<form class="layui-form" id="addInfo_form">
										<fieldset class="layui-elem-field layui-field-title fieldset"
											id="baseInfo">
											<legend class="layui-btn layui-legend"
												style="text-align: left; cursor: default;">项目基础信息
												> </legend>
											<div style="margin-top: 20px">

												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">申请公司</label>
														<div class="layui-input-inline">
															<input type="text" value="${buildInfo.orgName}"
																style="border: 0px;width:220px" readonly="readonly"
																class="layui-input" readonly="readonly">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">申请部门</label>
														<div class="layui-input-inline">
															<input type="text" value="${buildInfo.deptName}"
																style="border: 0px;" readonly="readonly"
																class="layui-input">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">申请人</label>
														<div class="layui-input-inline">
															<input type="text" name="staffName"
																value="${buildInfo.staffName}" readonly="readonly"
																style="border: 0px" autocomplete="off"
																class="layui-input">
														</div>
													</div>
												</div>

												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">项目名称</label>
														<div class="layui-input-inline">
															<input type="text" value="${buildInfo.proName}"
																style="border: 0px;width:220px" readonly="readonly"
																class="layui-input">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">项目地点</label>
														<div class="layui-input-inline">
															<input type="text" value="${buildInfo.cityName}"
																style="border: 0px;" readonly="readonly"
																class="layui-input">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">总投资额（万元）</label>
														<div class="layui-input-inline">
															<input type="text" value="${buildInfo.sumAmount}"
																style="border: 0px;" readonly="readonly"
																class="layui-input">
														</div>
													</div>
												</div>


												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">建安工程总费用（万元）</label>
														<div class="layui-input-inline">
															<input type="text" value="${buildInfo.sumCae}"
																style="border: 0px;" readonly="readonly"
																class="layui-input">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">项目合同签订日期</label>
														<div class="layui-input-inline">
															<input type="text" name="bondEndDate"
																value="<fmt:formatDate value="${buildInfo.proSignDate}" pattern="yyyy-MM-dd"/>"
																style="border: 0px;" readonly="readonly"
																class="layui-input">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">承继合同签订日期</label>
														<div class="layui-input-inline">
															<input type="text" name="takeSignDate"
																value="<fmt:formatDate value="${buildInfo.takeSignDate}" pattern="yyyy-MM-dd"/>"
																style="border: 0px;" readonly="readonly"
																class="layui-input">
														</div>
													</div>
												</div>

												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">备案合同签订日期</label>
														<div class="layui-input-inline">
															<input type="text" name="recordSignDate"
																value="<fmt:formatDate value="${buildInfo.recordSignDate}" pattern="yyyy-MM-dd"/>"
																style="border: 0px;" readonly="readonly"
																class="layui-input">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">总包协议签订日期</label>
														<div class="layui-input-inline">
															<input type="text" name="packSignDate"
																value="<fmt:formatDate value="${buildInfo.packSignDate}" pattern="yyyy-MM-dd"/>"
																style="border: 0px;" readonly="readonly"
																class="layui-input">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">建设期（年）</label>
														<div class="layui-input-inline">
															<input type="text" value="${buildInfo.buildYears!=null?buildInfo.buildYears:proContract.buildYears}"
																maxlength="5" name="buildYears" readonly="readonly"
																style="border: 0px;" autocomplete="off"
																class="layui-input">
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">建设期描述</label>
														<div class="layui-input-inline">
															<textarea readonly="readonly" class="layui-textarea"
																style="width: 899px; height: 90px;"
																name="buildPeriodMemo">${buildInfo.buildPeriodMemo}</textarea>
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">建设期开始日期</label>
														<div class="layui-input-inline">
															<input type="text" name="buildStartDate"
																value="<fmt:formatDate value="${buildInfo.buildStartDate}" pattern="yyyy-MM-dd"/>"
																style="border: 0px;" readonly="readonly"
																class="layui-input">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">建设期结束日期</label>
														<div class="layui-input-inline">
															<input type="text" name="buildStartDate"
																value="<fmt:formatDate value="${buildInfo.buildEndDate}" pattern="yyyy-MM-dd"/>"
																style="border: 0px;" readonly="readonly"
																class="layui-input">
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">开工日描述</label>
														<div class="layui-input-inline">
															<textarea name="openMemo" class="layui-textarea"
																readonly="readonly" style="width: 899px; height: 90px;">${buildInfo.openMemo}</textarea>
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">运营期（年）</label>
														<div class="layui-input-inline">
															<input type="text" value="${buildInfo.omYears!=null?buildInfo.omYears:proContract.omYears}"
																name="buildYears" readonly="readonly"
																style="border: 0px;" autocomplete="off"
																class="layui-input">
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">运营期描述</label>
														<div class="layui-input-inline">
															<textarea name="omPeriodMemo" readonly="readonly"
																placeholder="请输入运营期描述" class="layui-textarea"
																style="width: 899px; height: 90px;">${buildInfo.omPeriodMemo}</textarea>
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">建设期利息（元）</label>
														<div class="layui-input-inline">
															<input type="text" value="${buildInfo.buildInterest!=null?buildInfo.buildInterest:proContractInvest.buildInterest}"
																name="buildYears" readonly="readonly"
																style="border: 0px;" autocomplete="off"
																class="layui-input">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">建设期绩效考核说明</label>
														<div class="layui-input-inline">
															<textarea style="width: 475px; height: 90px;" 
																name="assessMemo" readonly="readonly" class="layui-textarea">${buildInfo.assessMemo!=null?buildInfo.assessMemo:proContract.buildKpiMemo}</textarea>
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">关于工期延误条款</label>
														<div class="layui-input-inline">
															<textarea name="delayMemo" readonly="readonly" class="layui-textarea"
																style="width: 899px; height: 90px;">${buildInfo.delayMemo}</textarea>
														</div>
													</div>
												</div>
											</div>
										</fieldset>
										<fieldset class="layui-elem-field layui-field-title fieldset" id="subInfo">
											<legend class="layui-btn layui-legend" style="text-align: left; cursor: default;">子项信息 > </legend>
											<div style="margin-top: 20px;margin-bottom:15px">
												<div class="scroll-layui-table">
													<div class="scroll-layui-table-wraper-right">
														<div class=" scroll-layui-table-content">
															<table class="layui-table ">
																<colgroup>
																	<col width="100">
																	<col width="200">
																	<col width="230">
																	<col width="230">
																	<col width="230">
																	<col width="230">
																	<col width="230">
																	<col width="230">
																	<col width="230">
																	<col width="230">
																	<col width="130">
																	<col width="150">
																	<col width="150">
																	<col width="150">
																	<col width="150">
																</colgroup>
																<thead>
																	<tr>
																		<th>序号</th>
																		<th>子项名称</th>
																		<th>土地证日期</th>
																		<th>用地许可证日期</th>
																		<th>工程规划许可证日期</th>
																		<th>施工许可证日期（开工令）</th>
																		<th>内控开工日期</th>
																		<th>内控竣工日期</th>
																		<th>竣工验收日期</th>
																		<th>竣工备案日期</th>
																		<th>总工期（天）</th>
																		<th>已停工天数（天）</th>
																		<th>已延误天数（天）</th>
																		<th>工期顺延天数（天）</th>
																		<th>剩余工期天数（天）</th>
																	</tr>
																</thead>
																<tbody>
																	<c:forEach items="${buildInfo.buildSubList}" var="sub"
																		varStatus="status">
																		<tr id="">
																			<td><input type="text" name="subName"
																				readonly="readonly" style="border: 0px;"
																				value="${sub.orderIdx}" class="layui-input"></td>
																			<td><input type="text" name="subName"
																				readonly="readonly" style="border: 0px;"
																				value="${sub.subName}" title="${sub.subName}" class="layui-input"></td>
																			<td><input type="text" name="landDate" title="<fmt:formatDate value="${sub.landDate}" pattern="yyyy-MM-dd"/>"
																				readonly="readonly" style="border: 0px;"
																				value="<fmt:formatDate value="${sub.landDate}" pattern="yyyy-MM-dd"/>" class="layui-input" /></td>
																			<td><input type="text" name="landLicenceDate" title="<fmt:formatDate value="${sub.landLicenceDate}" pattern="yyyy-MM-dd"/>"
																				readonly="readonly" style="border: 0px;"
																				value="<fmt:formatDate value="${sub.landLicenceDate}" pattern="yyyy-MM-dd"/>"
																				autocomplete="off" class="layui-input" /></td>
																			<td><input type="text" title="<fmt:formatDate value="${sub.proPlanDate}" pattern="yyyy-MM-dd"/>"
																				value="<fmt:formatDate value="${sub.proPlanDate}" pattern="yyyy-MM-dd"/>"
																				name="proPlanDate" readonly="readonly"
																				style="border: 0px;" autocomplete="off"
																				class="layui-input" /></td>
																			<td><input type="text" name="buildLicenceDate" title="<fmt:formatDate value="${sub.buildLicenceDate}" pattern="yyyy-MM-dd"/>"
																				value="<fmt:formatDate value="${sub.buildLicenceDate}" pattern="yyyy-MM-dd"/>"
																				readonly="readonly" style="border: 0px;"
																				autocomplete="off" class="layui-input" /></td>
																			<td><input type="text" name="startDate" title="<fmt:formatDate value="${sub.startDate}" pattern="yyyy-MM-dd"/>"
																				value="<fmt:formatDate value="${sub.startDate}" pattern="yyyy-MM-dd"/>"
																				autocomplete="off" class="layui-input"
																				readonly="readonly" style="border: 0px;" /></td>
																			<td><input type="text" name="endDate" title="<fmt:formatDate value="${sub.endDate}" pattern="yyyy-MM-dd"/>"
																				readonly="readonly" style="border: 0px;"
																				value="<fmt:formatDate value="${sub.endDate}" pattern="yyyy-MM-dd"/>"
																				autocomplete="off" class="layui-input"
																				readonly="readonly" style="border:0px;" /></td>
																			<td><input type="text" name="checkDate" title="<fmt:formatDate value="${sub.checkDate}" pattern="yyyy-MM-dd"/>"
																				value="<fmt:formatDate value="${sub.checkDate}" pattern="yyyy-MM-dd"/>"
																				autocomplete="off" class="layui-input"
																				readonly="readonly" style="border: 0px;" /></td>
																			<td><input type="text" readonly="readonly" title="<fmt:formatDate value="${sub.onRecordDate}" pattern="yyyy-MM-dd"/>"
																				style="border: 0px;" name="onRecordDate"
																				value="<fmt:formatDate value="${sub.onRecordDate}" pattern="yyyy-MM-dd"/>"
																				autocomplete="off" class="layui-input" /></td>
																			<td><input type="text" value="${sub.totalDays}"
																				maxlength="5" readonly="readonly"
																				style="border: 0px;" name="totalDays"
																				lay-verify="required" autocomplete="off"
																				class="layui-input"></td>
																			<td><input type="text" value="${sub.stopDays}"
																				maxlength="5" readonly="readonly"
																				style="border: 0px;" name="stopDays"
																				lay-verify="required" autocomplete="off"
																				class="layui-input"></td>
																			<td><input type="text"
																				value="${sub.delayedDays}" maxlength="5"
																				readonly="readonly" style="border: 0px;"
																				name="delayedDays" lay-verify="required"
																				autocomplete="off" class="layui-input"></td>
																			<td><input type="text" value="${sub.putOffDays}"
																				maxlength="5" readonly="readonly"
																				style="border: 0px;" name="putOffDays"
																				lay-verify="required" autocomplete="off"
																				class="layui-input"></td>
																			<td><input type="text" value="${sub.restDays}"
																				maxlength="5" readonly="readonly"
																				style="border: 0px;" name="restDays"
																				lay-verify="required" autocomplete="off"
																				class="layui-input"></td>
																		</tr>
																	</c:forEach>
																</tbody>
															</table>
														</div>
													</div>
												</div>
											</div>
										</fieldset>
										<fieldset class="layui-elem-field layui-field-title fieldset" id="otherInfo">
											<legend class="layui-btn layui-legend" style="text-align: left; cursor: default;">其他信息 > </legend>
											<div style="margin-top: 20px">
												<div class="layui-form-item">
													<div class="layui-inline">
														<label class="layui-form-label">备注</label>
														<div class="layui-input-inline">
															<textarea name="memo" readonly="readonly" class="layui-textarea"
																style="width: 899px; height: 90px;">${buildInfo.memo}</textarea>
														</div>
													</div>
												</div>
											</div>
										</fieldset>
										<fieldset class="layui-elem-field layui-field-title fieldset">
											<legend class="layui-btn layui-legend" style="text-align: left; cursor: default;">附件信息 > </legend>
											<div style="margin-top: 20px;">
												<div class="layui-form-item">
													<label class="layui-form-label" style="width: 350px;">支持pdf、excel、word、图片资料，可上传多个</label>
												</div>
												<div class="layui-form-item">
													<label class="layui-form-label">土地证</label>
													<div class="layui-input-block">
														<div class="layui-upload">
															<div class="layui-upload-list" id="1-upload-more-list">
																<c:forEach items="${buildInfo.buildAttList}"
																	var="fileAtt">
																	<c:if test="${fileAtt.types == '1' }">
																		<div class="layui-upload-img-div">
																			<c:choose>
																				<c:when
																					test="${fileAtt.fileSuffix == '.jpg' or fileAtt.fileSuffix == '.jpeg' or fileAtt.fileSuffix == '.png'}">
																					<img src="${fileHttpPre }/${fileAtt.filePath }"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:when>
																				<c:otherwise>
																					<img
																						src="${ctx}/resources/images/${fn:substring(fileAtt.fileSuffix,1,5)}.jpg"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:otherwise>
																			</c:choose>
																			<div class="mask">
																				<a href="javascript:void(0)"
																					style="margin-left: 32px"
																					onclick="showImg('${fileHttpPre}/${fileAtt.filePath }');">查看</a>
																			</div>
																			<p>${fileAtt.fileName}</p>
																		</div>
																	</c:if>
																</c:forEach>
															</div>
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<label class="layui-form-label">用地许可证</label>
													<div class="layui-input-block">
														<div class="layui-upload">
															<div class="layui-upload-list" id="2-upload-more-list">
																<c:forEach items="${buildInfo.buildAttList}"
																	var="fileAtt">
																	<c:if test="${fileAtt.types == '2' }">
																		<div class="layui-upload-img-div">
																			<c:choose>
																				<c:when
																					test="${fileAtt.fileSuffix == '.jpg' or fileAtt.fileSuffix == '.jpeg' or fileAtt.fileSuffix == '.png'}">
																					<img src="${fileHttpPre }/${fileAtt.filePath }"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:when>
																				<c:otherwise>
																					<img
																						src="${ctx}/resources/images/${fn:substring(fileAtt.fileSuffix,1,5)}.jpg"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:otherwise>
																			</c:choose>
																			<div class="mask">
																				<a href="javascript:void(0)"
																					style="margin-left: 32px"
																					onclick="showImg('${fileHttpPre}/${fileAtt.filePath }');">查看</a>
																			</div>
																			<p>${fileAtt.fileName}</p>
																		</div>
																	</c:if>
																</c:forEach>
															</div>
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<label class="layui-form-label">工程规划许可证</label>
													<div class="layui-input-block">
														<div class="layui-upload">
															<div class="layui-upload-list" id="3-upload-more-list">
																<c:forEach items="${buildInfo.buildAttList}"
																	var="fileAtt">
																	<c:if test="${fileAtt.types == '3' }">
																		<div class="layui-upload-img-div">
																			<c:choose>
																				<c:when
																					test="${fileAtt.fileSuffix == '.jpg' or fileAtt.fileSuffix == '.jpeg' or fileAtt.fileSuffix == '.png'}">
																					<img src="${fileHttpPre }/${fileAtt.filePath }"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:when>
																				<c:otherwise>
																					<img
																						src="${ctx}/resources/images/${fn:substring(fileAtt.fileSuffix,1,5)}.jpg"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:otherwise>
																			</c:choose>
																			<div class="mask">
																				<a href="javascript:void(0)"
																					style="margin-left: 32px"
																					onclick="showImg('${fileHttpPre}/${fileAtt.filePath }');">查看</a>
																			</div>
																			<p>${fileAtt.fileName}</p>
																		</div>
																	</c:if>
																</c:forEach>
															</div>
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<label class="layui-form-label">施工许可证（开工令）</label>
													<div class="layui-input-block">
														<div class="layui-upload">
															<div class="layui-upload-list" id="4-upload-more-list">
																<c:forEach items="${buildInfo.buildAttList}"
																	var="fileAtt">
																	<c:if test="${fileAtt.types == '4' }">
																		<div class="layui-upload-img-div">
																			<c:choose>
																				<c:when
																					test="${fileAtt.fileSuffix == '.jpg' or fileAtt.fileSuffix == '.jpeg' or fileAtt.fileSuffix == '.png'}">
																					<img src="${fileHttpPre }/${fileAtt.filePath }"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:when>
																				<c:otherwise>
																					<img
																						src="${ctx}/resources/images/${fn:substring(fileAtt.fileSuffix,1,5)}.jpg"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:otherwise>
																			</c:choose>
																			<div class="mask">
																				<a href="javascript:void(0)"
																					style="margin-left: 32px"
																					onclick="showImg('${fileHttpPre}/${fileAtt.filePath }');">查看</a>
																			</div>
																			<p>${fileAtt.fileName}</p>
																		</div>
																	</c:if>
																</c:forEach>
															</div>
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<label class="layui-form-label">内控开工令</label>
													<div class="layui-input-block">
														<div class="layui-upload">
															<div class="layui-upload-list" id="5-upload-more-list">
																<c:forEach items="${buildInfo.buildAttList}"
																	var="fileAtt">
																	<c:if test="${fileAtt.types == '5' }">
																		<div class="layui-upload-img-div">
																			<c:choose>
																				<c:when
																					test="${fileAtt.fileSuffix == '.jpg' or fileAtt.fileSuffix == '.jpeg' or fileAtt.fileSuffix == '.png'}">
																					<img src="${fileHttpPre }/${fileAtt.filePath }"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:when>
																				<c:otherwise>
																					<img
																						src="${ctx}/resources/images/${fn:substring(fileAtt.fileSuffix,1,5)}.jpg"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:otherwise>
																			</c:choose>
																			<div class="mask">
																				<a href="javascript:void(0)"
																					style="margin-left: 32px"
																					onclick="showImg('${fileHttpPre}/${fileAtt.filePath }');">查看</a>
																			</div>
																			<p>${fileAtt.fileName}</p>
																		</div>
																	</c:if>
																</c:forEach>
															</div>
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<label class="layui-form-label">竣工验收和备案</label>
													<div class="layui-input-block">
														<div class="layui-upload">
															<div class="layui-upload-list" id="6-upload-more-list">
																<c:forEach items="${buildInfo.buildAttList}"
																	var="fileAtt">
																	<c:if test="${fileAtt.types == '6' }">
																		<div class="layui-upload-img-div">
																			<c:choose>
																				<c:when
																					test="${fileAtt.fileSuffix == '.jpg' or fileAtt.fileSuffix == '.jpeg' or fileAtt.fileSuffix == '.png'}">
																					<img src="${fileHttpPre }/${fileAtt.filePath }"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:when>
																				<c:otherwise>
																					<img
																						src="${ctx}/resources/images/${fn:substring(fileAtt.fileSuffix,1,5)}.jpg"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:otherwise>
																			</c:choose>
																			<div class="mask">
																				<a href="javascript:void(0)"
																					style="margin-left: 32px"
																					onclick="showImg('${fileHttpPre}/${fileAtt.filePath }');">查看</a>
																			</div>
																			<p>${fileAtt.fileName}</p>
																		</div>
																	</c:if>
																</c:forEach>
															</div>
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<label class="layui-form-label">工期签证</label>
													<div class="layui-input-block">
														<div class="layui-upload">
															<div class="layui-upload-list" id="7-upload-more-list">
																<c:forEach items="${buildInfo.buildAttList}"
																	var="fileAtt">
																	<c:if test="${fileAtt.types == '7' }">
																		<div class="layui-upload-img-div">
																			<c:choose>
																				<c:when
																					test="${fileAtt.fileSuffix == '.jpg' or fileAtt.fileSuffix == '.jpeg' or fileAtt.fileSuffix == '.png'}">
																					<img src="${fileHttpPre }/${fileAtt.filePath }"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:when>
																				<c:otherwise>
																					<img
																						src="${ctx}/resources/images/${fn:substring(fileAtt.fileSuffix,1,5)}.jpg"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:otherwise>
																			</c:choose>
																			<div class="mask">
																				<a href="javascript:void(0)"
																					style="margin-left: 32px"
																					onclick="showImg('${fileHttpPre}/${fileAtt.filePath }');">查看</a>
																			</div>
																			<p>${fileAtt.fileName}</p>
																		</div>
																	</c:if>
																</c:forEach>
															</div>
														</div>
													</div>
												</div>
												<div class="layui-form-item">
													<label class="layui-form-label">其他附件</label>
													<div class="layui-input-block">
														<div class="layui-upload">
															<div class="layui-upload-list" id="8-upload-more-list">
																<c:forEach items="${buildInfo.buildAttList }" var="fileAtt">
																	<c:if test="${fileAtt.types == '8' }">
																		<div class="layui-upload-img-div">
																			<c:choose>
																				<c:when
																					test="${fileAtt.fileSuffix == '.jpg' or fileAtt.fileSuffix == '.jpeg' or fileAtt.fileSuffix == '.png'}">
																					<img src="${fileHttpPre }/${fileAtt.filePath }"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:when>
																				<c:otherwise>
																					<img
																						src="${ctx}/resources/images/${fn:substring(fileAtt.fileSuffix,1,5)}.jpg"
																						title="${fileAtt.fileName}"
																						class="layui-upload-img">
																				</c:otherwise>
																			</c:choose>
																			<div class="mask">
																				<a href="javascript:void(0)"
																					style="margin-left: 32px"
																					onclick="showImg('${fileHttpPre}/${fileAtt.filePath }');">查看</a>
																			</div>
																			<p>${fileAtt.fileName}</p>
																		</div>
																	</c:if>
																</c:forEach>
															</div>
														</div>
													</div>
												</div>
											</div>
										</fieldset>
									</form>
									<!-- 务表单数据显示  -->
								</div>
								<!-- 引入公共流程渲染页面   -->
								<%@ include file="../include/flowPublic.jsp"%>
							</div>
						</div>
					</div>
				</div>
				<!-- 审批时 显示 通过/拒绝按钮   -->
				<c:if test="${'y'==processDealWith}">
					<fieldset class="layui-elem-field layui-field-title fieldset"
						style="text-align: center;">
						<div class="layui-form-item">
							<div class="layui-input-block">
								<input class="layui-btn layuiadmin-btn-admin layui-btn-normal "
									style="margin-top: 6px;" type="button"
									data-type="to_pass_submit" id="to_pass_submit" value="审批通过">
								<input class="layui-btn layuiadmin-btn-admin layui-btn-primary "
									style="margin-top: 6px;" type="button"
									data-type="to_refuse_submit" id="to_refuse_submit" value="审批终止">
							</div>
						</div>
					</fieldset>
				</c:if>
				<!-- 审批意见  -->
				<form class="layui-form" id="flow_process_form" style="display: none">
					<input type="hidden" name="state" id="flow_process_form_state" /> <input
						type="hidden" name="srcBizSguid" value="${modelDetail.id }" /> <input
						type="hidden" name="processId" value="${modelDetail.processId }" />
					<div class="layui-form-item" style="padding-top: 10px">
						<label class="layui-form-label">审批结果</label>
						<div class="layui-input-inline">
							<input type="text" style="border: 0px;" readonly="readonly"
								class="layui-input" id="flow_process_form_state_txt">
						</div>
					</div>
					<div class="layui-form-item" style="padding-top: 10px">
						<label class="layui-form-label">审批意见</label>
						<div class="layui-input-inline">
							<textarea name="dealIdea" placeholder="请输入审批意见"
								lay-verify="required" class="layui-textarea"
								style="width: 475px; height: 145px;"></textarea>
						</div>
					</div>
					<fieldset class="layui-elem-field layui-field-title"
						style="margin-top: 15px;">
						<legend class="layui-btn layui-legend"
							style="text-align: left; cursor: default;">
							附件信息 > <label class="layui-form-label" style="width: 100%;">支持pdf、excel、word、图片资料，可上传多个
							</label>
						</legend>
					</fieldset>
					<div class="layui-form-item" style="margin-top: 10px;">
						<label class="layui-form-label">附件资料</label>
						<div class="layui-input-block">
							<div class="layui-upload">
								<button type="button" class="layui-btn" id="upload-more">上传</button>
								<div class="layui-upload-list" id="upload-more-list"></div>
							</div>
						</div>
					</div>
					<div class="layui-form-item layui-hide">
						<input type="button" lay-submit
							lay-filter="flow_process_from_submit"
							id="flow_process_from_submit" value="确认">
					</div>
				</form>
			</div>
		</div>
	</div>
	<script>
		//静态资源路径前缀
		var staticPath = '${fileHttpPre}';
		var stateJSON = <infopub:dicJson groupNo="A00010028" />;

		layui
				.config({
					base : '${ctx}/resources/layuiadmin/' //静态资源所在路径
				})
				.extend({
					index : 'lib/index' //主入口模块
				})
				.use(
						[ 'index', 'set', 'upload', 'element', 'laydate' ],
						function() {
							var $ = layui.$, form = layui.form, element = layui.element, laydate = layui.laydate, upload = layui.upload, table = layui.table;

							upload
									.render({
										elem : '#upload-more',
										url : basePath
												+ '/flowProcess/uploadAtt/',
										multiple : true,
										accept : 'file',
										acceptMime : 'application/zip,application/x-rar-compressed,image/jpeg,image/png,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/pdf',
										before : function(obj) { //obj参数包含的信息
											layer.load(); //上传loading
										},
										done : function(res) {
											//如果上传失败
											if (res.code > 0) {
												layer.closeAll('loading'); //关闭loading
												return layer.msg(res.msg, {
													icon : 7
												});
											}
											//上传完毕
											if (res.entity != null
													&& res.entity.length > 0) {
												for ( var i in res.entity) {
													var buildInfoAtt = res.entity[i];
													var arr = buildInfoAtt
															.split("|");
													var imgSrc = "";
													var suffix = arr[0]
															.substring(
																	arr[0]
																			.lastIndexOf(".") + 1,
																	arr[0].length);
													if (suffix == 'jpg'
															|| suffix == 'png') {
														imgSrc = "${fileHttpPre}/"
																+ arr[2];
													} else {
														imgSrc = "${ctx}/resources/images/"
																+ suffix
																+ ".jpg";
													}
													$('#upload-more-list')
															.append(
																	'<div class="layui-upload-img-div" id="upload_img_'+arr[1]+'"><img src="'+imgSrc+'" title="'+ arr[0] +'" class="layui-upload-img"><div class="mask"><a href="javascript:void(0)" onclick="showImg(\''
																			+ "${fileHttpPre}"
																			+ arr[2]
																			+ '\');">查看</a><a href="javascript:void(0)" onclick="del(\''
																			+ arr[1]
																			+ '\')";>删除</a></div><p>'
																			+ arr[0]
																			+ '</p><input type="hidden" value="'+buildInfoAtt+'" id="fileAtt_'+arr[1]+'" name="fileAtts" ></input></div> ');
												}
											}
										},
										allDone : function(obj) { //当文件全部被提交后，才触发
											layer.closeAll('loading'); //关闭loading
										},
										error : function() {
											layer.closeAll('loading'); //关闭loading
											//上传失败
											layer.msg("上传失败，请稍后再试~", {
												icon : 7
											});
										}
									});

							// 按钮事件
							var active = {
								to_pass_submit : function() {
									$('#flow_process_form_state').val("1");
									$('#flow_process_form_state_txt').val(
											"审批通过");
									layer
											.open({
												type : 1,
												title : '审批通过确认',
												content : $('#flow_process_form'),
												area : layui.admin.screen() < 2 ? [
														'80%', '460px' ]
														: [ '820px', '460px' ],
												btn : [ '确定', '取消' ],
												btnAlign : 'c',
												yes : function(index, layero) {
													var submitID = 'flow_process_from_submit', submit = layero
															.contents()
															.find(
																	'#'
																			+ submitID);
													//监听提交
													form
															.on(
																	'submit('
																			+ submitID
																			+ ')',
																	function(
																			data) {
																		var field = data.field; //获取提交的字段
																		layer
																				.load();
																		//提交 Ajax 成功后，静态更新表格中的数据
																		$
																				.ajax({
																					type : 'post',
																					url : basePath
																							+ "/flowProcess/dealWith",
																					data: $('#flow_process_form').serialize(),
																					success : function(
																							result) {
																						if (result.success) {
																							layer
																									.closeAll('loading'); //关闭loading
																							layer
																									.msg(
																											'处理成功~',
																											{
																												icon : 1
																											});
																							//两秒后关闭当前页面
																							setTimeout(
																									function() {
																										// 刷新首页 
																										var iframe = window.parent.layui.admin
																												.tabsBody(
																														0)
																												.find(
																														".layadmin-iframe");
																										iframe[0].contentWindow.location
																												.reload(true);
																										top.layui.admin
																												.closeThisTabs(); // 关闭当前标签页
																									},
																									2000);
																						} else {
																							layer
																									.closeAll('loading'); //关闭loading
																							layer
																									.msg(
																											result.msg,
																											{
																												icon : 7
																											});
																						}
																					}
																				});
																	});
													submit.trigger('click');
												}
											});
								},
								to_refuse_submit : function() {
									$('#flow_process_form_state').val("0");
									$('#flow_process_form_state_txt').val(
											"审批终止");
									layer
											.open({
												type : 1,
												title : '审批终止确认',
												content : $('#flow_process_form'),
												area : layui.admin.screen() < 2 ? [
														'80%', '460px' ]
														: [ '820px', '460px' ],
												btn : [ '确定', '取消' ],
												btnAlign : 'c',
												yes : function(index, layero) {
													var submitID = 'flow_process_from_submit', submit = layero
															.contents()
															.find(
																	'#'
																			+ submitID);
													//监听提交
													form
															.on(
																	'submit('
																			+ submitID
																			+ ')',
																	function(
																			data) {
																		var field = data.field; //获取提交的字段
																		layer
																				.load();
																		//提交 Ajax 成功后，静态更新表格中的数据
																		$
																				.ajax({
																					type : 'post',
																					url : basePath
																							+ "/flowProcess/dealWith",
																				    data: $('#flow_process_form').serialize(),
																					success : function(
																							result) {
																						if (result.success) {
																							layer
																									.closeAll('loading'); //关闭loading
																							layer
																									.msg(
																											'处理成功~',
																											{
																												icon : 1
																											});
																							//两秒后关闭当前页面
																							setTimeout(
																									function() {
																										// 刷新首页 
																										var iframe = window.parent.layui.admin
																												.tabsBody(
																														0)
																												.find(
																														".layadmin-iframe");
																										iframe[0].contentWindow.location
																												.reload(true);
																										top.layui.admin
																												.closeThisTabs(); // 关闭当前标签页
																									},
																									2000);
																						} else {
																							layer
																									.closeAll('loading'); //关闭loading
																							layer
																									.msg(
																											result.msg,
																											{
																												icon : 7
																											});
																						}
																					}
																				});
																	});
													submit.trigger('click');
												}
											});
								}
							}
							// data-type事件
							$('.layui-btn.layuiadmin-btn-admin').on(
									'click',
									function() {
										var type = $(this).data('type');
										active[type] ? active[type].call(this)
												: '';
									});

						});

		//删除文件
		function del(index) {
			layui.$("#fileAtt_" + index).remove();
			layui.$("#upload_img_" + index).remove();
		}

		//根据url查看文件
		function showImg(url) {
			var openWin = window
					.open(
							url,
							'',
							'left=410,height=768, width=1024, top=200,  toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
		}
	</script>
</body>
</html>

